﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!--<ResourceDictionary Source="FormStyling.xaml" />
    This sets the box, header and button styles for the entry blocks on the PersonalDetails page (and its sub-blocks)
    Note that some global formats are declared in MainResourceDicationary-->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SSCCMembership;component/MainResourceDictionary.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
     <Style TargetType="TextBlock" x:Key="BoxHeading">
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="FontSize" Value="22"/>
        <Setter Property="Foreground" Value="{StaticResource PurpleBrush}"/>
    </Style>

    <Style TargetType="TextBlock" x:Key="SubText">
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="FontSize" Value="14"/>
    </Style>

    <Style TargetType="Border" x:Key="BoxBorder">
        <Setter Property="BorderThickness" Value="8"/>
        <Setter Property="CornerRadius" Value="20"/>
        <Setter Property="Padding" Value="5"/>
        <Setter Property="Margin" Value="5"/>
        <Setter Property="BorderBrush" Value="{StaticResource PurpleBrush}"/>
    </Style>

    <Style TargetType="CheckBox" >
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center"/>
    </Style>
    
    <Style TargetType="Button" x:Key="Delete">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Image Source="/P_PersonalDetails;component/purple_empty.png" Height="20" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Normal" GeneratedDuration="0:0:0.5" To="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.5" To="0.2" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition To="Normal" GeneratedDuration="0:0:0.5" From="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="Pressed" GeneratedDuration="0:0:0.5" To="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.1" To="0.2" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition To="Pressed" GeneratedDuration="0:0:0.5" From="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.1" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.2" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PurpleHue"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle RadiusY="10" RadiusX="10" StrokeThickness="8" Stroke="{StaticResource PurpleBrush}">
                            <Rectangle.Fill>
                                <RadialGradientBrush GradientOrigin="-1,-1">
                                    <GradientStop Color="#FF726F6F" Offset="1"/>
                                    <GradientStop Color="White"/>
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="PurpleHue" RadiusY="10" RadiusX="10" Opacity="0">
                            <Rectangle.Fill>
                                <RadialGradientBrush GradientOrigin="-1,-1">
                                    <GradientStop Color="{StaticResource Purple}" Offset="1"/>
                                    <GradientStop Color="White"/>
                                </RadialGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Margin="10"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="{StaticResource PurpleBrush}"/>
    </Style>
</ResourceDictionary>
